package com.woniu.p2p.serviceImpl;

import com.woniu.p2p.entity.Admin;
import com.woniu.p2p.mapper.AdminMapper;
import com.woniu.p2p.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 86152
 * @create 2020/8/14
 * @since 1.0.0
 */
@Service
public class AdminServiceImp implements AdminService {
    @Autowired
    AdminMapper adminMapper;

    @Override
    public Admin login(String adminName) {
        return adminMapper.selectByadminName(adminName);
    }

    @Override
    public int changepwd(String adminName, String md6) {
        return adminMapper.changepwd(adminName,md6);
    }

    @Override
    public String getimgbyadminaccount(String adminAccount) {
        return adminMapper.getimgbyadminaccount(adminAccount);
    }

    @Override
    public void updateimgbyadminaccount(String adminAccount, String newimg) {
        adminMapper.updateimgbyadminaccount(adminAccount,newimg);
    }
}
